Book Contents

Arithmetic operators in expressions

Arithmetic operators allow you to perform basic arithmetical functions.

Symbol

Operator

Example

+

addition

tag1 + tag2

-

subtraction

tag1 - tag2

*

multiplication

tag1 * tag2

/

division

tag1 / tag2

MOD, %

modulus (remainder)

tag1 % tag2

**

exponent

tag1 ** 2

Tip:

  • Be sure that any tag value you use as a divisor cannot at some point have a value of zero. Expressions that attempt to divide a number by zero produce an error at run time.
  • To use MOD, both tags must contain integer values.

See also

About expressions

Operator precedence

Example: Arithmetic operators